package com.qzsoft.zhjd.warning.modules.warningenvconfig.entity;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qzsoft.jeemis.common.validator.group.AddGroup;
import com.qzsoft.jeemis.common.validator.group.UpdateGroup;

import lombok.Data;

/**
 * @ClassName WarningEnvUserEntity
 * @Description 环保预警推送用户
 * @author linhuawei
 * @since 2022-05-16
 */
@Data
@TableName("n_warning_env_user")
public class WarningEnvUserEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 配置主键
     */
    private String configId;

    /**
     * 姓名
     */
    @NotBlank(groups = { AddGroup.class, UpdateGroup.class }, message = "姓名不可为空")
    @Length(groups = { AddGroup.class, UpdateGroup.class }, max = 20, message = "姓名长度不可超过{max}")
    private String name;

    /**
     * 手机号码
     */
    @NotBlank(groups = { AddGroup.class, UpdateGroup.class }, message = "手机号码不可为空")
    @Length(groups = { AddGroup.class, UpdateGroup.class }, max = 11, message = "手机号码格式错误")
    private String phone;

}
